<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 基本表单</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/ace.min.css" />
    <link href="/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link href="/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <style type="text/css">
        .span_right{
            float: right;
        }
        .down-menu{
            height: 35px;
            line-height: 35px;
        }
        .search_div{
            background: none;
            border: none;
            width: 450px !important;
        }
        .m-search{
            display: flex;
            margin-left: 30px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>知识库-
                        <small>常见问题列表</small>
                    </h5>

                </div>
                <div class="ibox-content">
                    <form method="get" action="<{$SRVER_NAME}>/admin.php/Knowledge/knowledgelist"  style="display: flex;   margin-right: 30px;" class="pull-right mail-search">
                        <select  class="form-control " style="width: 100px" name="type" >
                            <option value="0" <if condition="$type eq 0">selected</if> >全部</option>
                            <option value="1" <if condition="$type eq 1">selected</if>>产品使用</option>
                            <option value="2" <if condition="$type eq 2">selected</if>>支付</option>
                            <option value="3" <if condition="$type eq 3">selected</if>>认证</option>
                            <option value="4" <if condition="$type eq 4">selected</if>>基础信息</option>
                            <option value="5" <if condition="$type eq 5">selected</if>>其他</option>
                        </select>
                        <div class="m-search" style="display: flex">
                            <input type="hidden" name="rid" value="<{$rid}>">
                            <input  class="form-control input-sm" type="text" name="know" placeholder="搜索标题" value="<{$standard_question}>"/>
                            <div class="input-group-btn">
                                <button type="submit" class="btn btn-sm btn-primary">
                                    搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <table class="table table-striped table-bordered table-hover" id="sample-table">
                        <thead>
                        <tr>
                            <th width="100px">标准问题</th>
                            <th width="100px">分类</th>
                            <th width="160px">创建时间</th>
                            <th width="200px">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="data" id="vs">
                            <tr id="tr_<{$vs.id}>">
                                <td><{$vs.standard_question}></td>
                                <td><{$vs.type}></td>
                                <td><{$vs.ctime}></td>
                                <td id="th_<{$vs.id}>">
                                    <volist name="roles" id="vr">
                                        <if condition="$vr['name'] eq '查看详情'">
                                            <a class="btn btn-success btn-rounded"  href="kno_list_details.html?id=<{$vs.id}>" >查看详情</a>
                                        </if>
                                        <if condition="$vr['name'] eq '修改'">
                                            <a class="btn btn-info btn-rounded"  href="editknowledge.html?id=<{$vs.id}>" >修改</a>
                                        </if>
                                        <if condition="$vr['name'] eq '删除'">
                                            <a class="btn btn-danger btn-rounded" href="javascript:;" onclick="del('<{$vs.id}>')" >删除</a>
                                        </if>
                                    </volist>


                                </td>
                                </if>

                            </tr>
                        </volist>

                        </tbody>
                    </table>
                    <div class="dataTables_paginate paging_simple_numbers" >
                        <ul class="pagination">
                            <if condition="$tol gt 10">
                                <{$fpage}>
                            </if>

                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/js/content.js?v=1.0.0"></script>
<script>
    function del(id) {
        $.post('<{$SRVER_NAME}>/admin.php/Knowledge/delknowledge',{id:id},function(data){
            if(data.code=='1001'){
                $('#tr_'+id).remove();
                layer.alert(data.result);
            }else{
                layer.alert(data.result);
            }
        });
    }
</script>
</body>
</html>
